﻿using System.Windows;
using System.Windows.Controls;
using Red.Controls.TimeLine.ViewModels;

namespace Red.Controls.TimeLine.TrackHeadersTree
{
    #region Track Headers Data Temaplate Selector

    public sealed class TrackHeadersDataTemplateSelector : DataTemplateSelector
    {
        public DataTemplate TracksGroupDataTemplate { get; set; }
        public DataTemplate TrackDataTemplate { get; set; }

        public override DataTemplate SelectTemplate( object item, DependencyObject container )
        {
            if ( item is TracksGroup )
            {
                return TracksGroupDataTemplate;
            }

            if ( item is Track )
            {
                return TrackDataTemplate;
            }

            return null;
        }
    }

    #endregion

    #region TrackHeadersTreeContainterStyleSelector

    public sealed class TrackHeadersTreeContainterStyleSelector : StyleSelector
    {
        public Style TracksGroup { get; set; }
        public Style Track { get; set; }

        public override Style SelectStyle( object item, DependencyObject container )
        {            
            if ( item is Track )
            {
                return Track;
            }

            if ( item is TracksGroup )
            {
                return TracksGroup;
            }
            
            return null;
        }
    }

    #endregion

    #region TracksTree

    class TrackHeadersTree : TreeView
    {
    }

    #endregion
}
